import {createRouter, createWebHashHistory, RouteRecordRaw}  from "vue-router"
import { constantRoutes } from "./routes"



let router = createRouter({
    history:createWebHashHistory(),
    routes:constantRoutes,
    //切换路由时滚动到顶部
    scrollBehavior(to, from, savedPosition) {
        return {
            left:0,
            top:0
        }
    },
})

export default router